Problem Note 55269: An undeclared array in a SUM statement in PROC DS2 returns the error "TKTSExecDirect failed"
The following errors are written to the SAS® log when an undeclared array is referenced in a SUM statement with the DS2 procedure:
ERROR: TKTSExecDirect failed.
ERROR: Access violation.
To circumvent the problem, declare the array with a VARARRAY statement before referencing the array in the code. The sample code on the Full Code tab illustrates this.
Operating System and Release Information
SAS System | Base SAS | z/OS | 9.4 TS1M0 | 9.4 TS1M3 |
Z64 | 9.4 TS1M0 | 9.4 TS1M3 |
Microsoft® Windows® for 64-Bit Itanium-based Systems | 9.4 TS1M0 | |
Microsoft® Windows® for x64 | 9.4 TS1M0 | 9.4 TS1M3 |
Microsoft Windows 8 Enterprise x64 | 9.4 TS1M0 | 9.4 TS1M3 |
Microsoft Windows 8 Pro x64 | 9.4 TS1M0 | 9.4 TS1M3 |
Microsoft Windows 8.1 Enterprise 32-bit | 9.4 TS1M0 | 9.4 TS1M3 |
Microsoft Windows 8.1 Enterprise x64 | 9.4 TS1M0 | 9.4 TS1M3 |
Microsoft Windows 8.1 Pro | 9.4 TS1M0 | 9.4 TS1M3 |
Microsoft Windows 8.1 Pro 32-bit | 9.4 TS1M0 | 9.4 TS1M3 |
Microsoft Windows Server 2008 R2 | 9.4 TS1M0 | 9.4 TS1M3 |
Microsoft Windows Server 2008 for x64 | 9.4 TS1M0 | 9.4 TS1M3 |
Microsoft Windows Server 2012 Datacenter | 9.4 TS1M0 | 9.4 TS1M3 |
Microsoft Windows Server 2012 R2 Datacenter | 9.4 TS1M0 | 9.4 TS1M3 |
Microsoft Windows Server 2012 R2 Std | 9.4 TS1M0 | 9.4 TS1M3 |
Microsoft Windows Server 2012 Std | 9.4 TS1M0 | 9.4 TS1M3 |
Windows 7 Enterprise x64 | 9.4 TS1M0 | 9.4 TS1M3 |
Windows 7 Professional x64 | 9.4 TS1M0 | 9.4 TS1M3 |
64-bit Enabled AIX | 9.4 TS1M0 | 9.4 TS1M3 |
64-bit Enabled HP-UX | 9.4 TS1M0 | 9.4 TS1M3 |
64-bit Enabled Solaris | 9.4 TS1M0 | 9.4 TS1M3 |
HP-UX IPF | 9.4 TS1M0 | 9.4 TS1M3 |
Linux for x64 | 9.4 TS1M0 | 9.4 TS1M3 |
Solaris for x64 | 9.4 TS1M0 | 9.4 TS1M3 |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
In the first step, the array UNASSIGNED is referenced in a SUM statement but the array is not declared prior to the reference. The code generates errors. In the second step, the addition of a VARARRAY statement causes the code to run correctly.
proc ds2;
data _null_;
method run();
unassigned[2]+1;
end;
run;
quit;
/* Adding the VARARRAY statement prevents the error */
proc ds2;
data _null_;
vararray double unassigned[2];
method run();
unassigned[2]+1;
end;
run;
quit;
Type: | Problem Note |
Priority: | medium |
Date Modified: | 2015-02-27 14:13:15 |
Date Created: | 2015-02-24 11:47:13 |